import React, { Component } from 'react';

import { ThemeContext } from './createContext';

class View extends Component {
    static contextType = ThemeContext;
    render(){
        console.log(this.context)
        return(
            <div>
                <ThemeContext.Consumer>
                    {(value)=>(
                        <div>11111-----{value.foreground}</div>
                    )}
                </ThemeContext.Consumer>
            </div>
        )
    }
}
// View.contextType = ThemeContext;
export default View;
